import { useSelector } from "react-redux"
// 获取store类型
import { stateType } from "../store"
// 获取用户信息类型
import { userStateType } from "../store/userReducer"

function  useGetUserInfo (){
    const {userName , nickName} = useSelector<stateType>(state => state.user) as userStateType
    return {userName , nickName}
}

export default useGetUserInfo